package 面试.ref;/*
 *@Author: helen
 *@Date:   2021/4/16 14:54
 *@Description:
 */

import java.util.Objects;

public class StrongReferenceDemo {
    public static void main(String[] args) {
        Object obj1 = new Object();  //这样定义的引用默认是强引用
        Object obj2 = obj1;  //引用复制
        obj1 = null;  //置空
        System.gc();
        System.out.println(obj2);
    }
}
